package ch01.a19.opers;

import ch01.a19.abstracts.Operation;

/**
 * @description: 类描述
 * @author: Fesine
 * @createTime:2016/7/13 17:37
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2016/7/13 17:37
 */
public class OperationDiv extends Operation {
    @Override
    public double getResult() {
        if (getNumberB() == 0) {
            try {
                throw new Exception("除数不能为0");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return getNumberA() / getNumberB();
    }
}
